package com.example.demo.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.example.demo.mapper.MovieMapper;
import com.example.demo.po.Movie;
import com.example.demo.po.News;
import com.example.demo.service.MovieService;

@Service
public class MovieServiceImpl implements MovieService{
	
	@Autowired
	private MovieMapper movieMapper;


	@Override
	public void update(Movie t) {
		// TODO Auto-generated method stub
		movieMapper.updateByPrimaryKey(t);
	}

	@Override
	public void delete(int id) {
		// TODO Auto-generated method stub
		movieMapper.deleteByPrimaryKey(id);
	}

	@Override
	public Movie selectById(int id) {
		// TODO Auto-generated method stub
		return movieMapper.selectByPrimaryKey(id);
	}

	@Override
	public List<Movie> selectAll() {
		// TODO Auto-generated method stub
		return movieMapper.selectByExample(null);
	}

	@Override
	public void insert(Movie t) {
		// TODO Auto-generated method stub
		movieMapper.insert(t);
	}

	
	
}
